<template>
	<view class="page_return">
		<u-button
			@click="page_return"
			:hair-line="false"
			:ripple = "true"
			:custom-style="{
				width:'fit-content',
				height:'fit-content',
				backgroundColor: '#5c77ff00',
				borderRadius:'50%',
				border: '0px solid #ffffff',
				padding: '10px',
			}">
			<u-icon name="arrow-leftward" size="38" :color="color"></u-icon>
		</u-button>
	</view>
</template>

<script>
export default{  //页面返回按钮组件
	name:"Page_return",
	props:{
		color:{
			type:String,
			default:"#ffffff",
		},
	},
	data(){
		return{
			on_click:true,  //防止多次点击关闭多个页面
		}
	},
	methods:{
		page_return(){
			if(this.on_click){
				this.on_click = false;
				uni.navigateBack(1);
			}
		},
	},
}
</script>

<style lang="scss" scoped>
.page_return{
	width: fit-content;
	height: fit-content;
}
</style>
